.container
  %input{"type"=>"hidden","id"=>"init_state","value"=>"#{@result_data['state']}"}
  %input{"type"=>"hidden","id"=>"product_source","value"=>"#{@product_source}"}
  = render 'root/op_header_return'
  .weui_cells_title
    收货地址
  .weui_cells.weui_cells_access#address_info
    %input{"type"=>"hidden","id"=>"latitude","value"=>""}
    %input{"type"=>"hidden","id"=>"longitude","value"=>""}
    .weui_cell
      .weui_cell_hd
        %label.weui_label
          手机号
      .weui_cell_bd
        %input.weui_input#telephone{:type=>'tel',:placeholder=>'请输入手机号',:value => "#{@result_data['telephone']}"}
    .weui_cell
      .weui_cell_hd
        %label.weui_label
          收货人
      .weui_cell_bd
        %input.weui_input#consignee{:type=>'text',:placeholder=>'请输入收货人'}
    .weui_cell.jyd_weui_cell_skip
      .weui_cell_hd
        %label.weui_label
          地址
      .weui_cell_bd{:style => 'width:100%', :onclick=>'alert_map()' }
        %input{"type"=>"hidden","id"=>"address","value"=>""}
        %span#address_show
    .weui_cell
      .weui_cell_hd
        %label.weui_label
          备注
      .weui_cell_bd
        %input.weui_input#remarks{:type=>'text',:placeholder=>'请输入备注'}
  .weui_cells_title
    支付方式
  .weui_cells#paymode_info
    %input#paymode{:type=>'hidden',:value => "0"}
    .weui_cell
      .weui_cell_bd
        货到付款
    -#.weui_cell.weui_cell_select
    -#  .weui_cell_bd{:style=> 'width:100%;'}
    -#    = select_tag "paymode", options_for_select([['微信支付',2], ['货到付款',0]], 2),:class => 'weui_select'
  .weui_cells_title
    商品明细
  .weui_cells#product_list
    -@result_data['order']['ordergoods'].each do |ordergood|
      .weui_cell
        %input{"type"=>"hidden","name"=>"product_id","value"=>"#{ordergood['product_id']}"}
        %input{"type"=>"hidden","name"=>"quantity","value"=>"#{ordergood['quantity']}"}
        .weui_cell_hd.product_img
          = image_tag ordergood['avatar_url']
        .weui_cell_bd.shoppingcart_info
          %p.product_title
            = ordergood['title']
          %span.product_number
            = "x#{ordergood['quantity']}"
        .weui_cell_ft.product_price
          = "¥ #{ordergood['price']}"
  .module_space
  .weui_cells#cost_info
    %input{"type"=>"hidden","id"=>"lowestprice","value"=>"#{@result_data['lowestprice']}"}
    %input{"type"=>"hidden","id"=>"fright","value"=>"#{@result_data['fright']}"}
    .weui_cell
      .weui_cell_hd
        %label.weui_label
          运费
      .weui_cell_bd#fright
        = "¥ #{@result_data['order']['fright']}"
    .weui_cell
      .weui_cell_hd
        %label.weui_label
          商品总额
      .weui_cell_bd#goodsvalue
        = "¥ #{@result_data['order']['goodsvalue']}"

  .pay_container
    %span.paycost
      = "实付金额 ¥ #{@result_data['order']['fright']+@result_data['order']['goodsvalue']}"
    %a.settlement{:href => 'javascript:submit_order();'}
      确认购买
= render 'goto_map'